package com.cyzy.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cyzy.dto.CropDto;
import com.cyzy.dto.FieldDto;
import com.cyzy.dto.PlotOrdersPayDto;
import com.cyzy.pojo.Crop;
import com.cyzy.pojo.Plot;
import com.cyzy.pojo.PlotOrders;

import java.util.List;


public interface PlotOrdersService {
    int addOrder(PlotOrders plotOrders);
    int updateOrder(PlotOrders plotOrders);
    String payOrder(PlotOrdersPayDto plotOrders);
    PlotOrders selectByOrderNum(String plotOrderNum);
    List<CropDto> selectCropByOrderNum(String plotOrderNum);
    PlotOrders selectUnpayOrder(Long userId);
    List<PlotOrders> selectOrdersByUserId (Long userId,Long plotOrderStatus);

    List<PlotOrders> getOrdersFromCache(String cacheKey);
    void cacheOrders(String cacheKey, List<PlotOrders> orders);
}
